#include <stdio.h>
#include <string.h>
#include "app_runner.h"
#include "ota_version.h"
#include "daemon_runner.h"

int main(int argc, char const *argv[])
{
    if(argc==1)
    {
        printf("请传入参数 : (app|ota|daemon|version|update) \n");
        return -1;
    }
    if(strcmp(argv[1],"app")==0)
    {
         app_runner_run();
    }
    else if(strcmp(argv[1],"ota")==0)
    {
         ota_version_check_daily();
    } else if(strcmp(argv[1],"daemon")==0)
    {
        //daemon..
        daemon_runner_start();

    }
    else if(strcmp(argv[1],"version")==0)
    {
        //version..
        ota_version_print();
    }
    else if(strcmp(argv[1],"update")==0)
    {
        //update..
        ota_version_check_and_update();
    }
    return 0;
}
